﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace FrmHotel
{
    public partial class FrmChaoShiTiXing : Form
    {
        public FrmChaoShiTiXing()
        {
            InitializeComponent();
        }
        public  int id;//接收房间号
        private void FrmChaoShiTiXing_Load(object sender, EventArgs e)
        {
            SataInfo();
        }
        public void SataInfo()

        {
            string sql = string.Format("select CeFangHao,CeName,CeCut from CetaeInfo where CeFangHao={0}", id);
            SqlDataReader reader = DBHelper.SelectMore(sql);
            if (reader.Read())
            {
                label2.Text = reader["CeFangHao"].ToString();
                label4.Text = reader["CeName"].ToString();
                label6.Text = reader["CeCut"].ToString();
            }
            reader.Close();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            FrmXvZhu fx = new FrmXvZhu();
            fx.id = id;
            fx.ShowDialog();
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FrmJieZhang fz = new FrmJieZhang();
            fz.id = id;
            fz.ShowDialog();
            this.Close();

        }
    }
}
